#include "FigureView.h"

FigureView::FigureView(Figure* figure, int id) {
	this->setFigure(figure);
	this->setId(id);
}

void FigureView::notify() {
	this->paint();
};

Position* FigureView::transformCoordBox2DToSDL(Position* position) {
	return new Position(transfX(position->getX()), transfY(position->getY()));
}

float FigureView::transfX(float x) {
	return float32(x*this->getScaleX());
};

float FigureView::transfY(float y) {
	return float32(((this->getPixelWindowHeight() - y*this->getScaleY())));
};

FigureView::~FigureView()
{
}
